package cn.jilian.admin.tool.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import cn.jilian.admin.tool.domain.ColumnInfo;
import cn.jilian.common.dto.PageInfo;
import cn.jilian.common.dto.PageResult;
import cn.jilian.common.dto.SortInfo;

public interface DBService {
	
	void createTable(String name,String comment);
	
	Map<String,Object> queryTable(String table);
	
	int addColumn(ColumnInfo columnInfo);

	PageResult<Map<String,Object>> queryTableList(PageInfo page,SortInfo sort);
	
	PageResult<Map<String,Object>> queryTableColumns(PageInfo page,String table);
	
	PageResult<Map<String,Object>> queryRecords(PageInfo page,String table);
	
	List<Map<String,Object>> queryTableColumns(String table);
	
	int moveSeq(String table,String column,int step);
	
	int updateColumn(ColumnInfo data);
	
	int updateTableComment(String table,String name,String comment);
	
	int changeTableName(String table,String name);
	
	int renameTable(String table,String name);
	
	String exportCreateSql(String table);
	
	String exportInsertSql(String table);
	
	int deleteTable(String table);
	
	int deleteTables(Collection<String> tables);
	
	int deleteColumns(String name,Collection<String> columns);
	
	
}
